<?php
class IndexAction extends Action{
    public function _initialize(){
	   //网站文件上传路径
	  $uploadfile=__ROOT__."/Public/Uploads/";
	  chmod($uploadfile,0777);
	}
    public function index(){
	   check_do_per();
       if(empty($_SESSION["admin"])){
	     $this->redirect("Login/index");
	   }
       $websetup=M("websetup");
       $setup=$websetup->field("webname")->find();
       $webname=$setup["webname"];
       $this->assign("webname",$webname);
	   
	   $sysconfig=M("sysconfig");
	   $sysconfig=$sysconfig->find();
	   $this->assign("sysconfig",$sysconfig);
        

	   //修改 lijianwei  2011-01-07  新的皮肤

	   //菜单
	   $parid=$_GET["parid"]?$_GET["parid"]:0;
	   $syscolumn=syscolumn($parid);
	   $this->assign("syscolumn",$syscolumn);
	   
	   //后台main页面
	   
	   $sysconfig = M("sysconfig");
	   $main_url = $sysconfig->getField("main_url");
	   $this->assign("main_url",$main_url);

	   $this->display();
   }
}
?>